package com.lamp.map;

import com.lamp.main.R;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.Paint.Style;
import android.util.AttributeSet;
import android.widget.LinearLayout;

public class map extends LinearLayout {
	private Paint borderPaint;

	public map(Context context, AttributeSet attr) {
		super(context, attr);
		init();
	}

	public map(Context context) {
		super(context);
		init();
		// TODO Auto-generated constructor stub
	}

	private void init() {
		borderPaint = new Paint();
		borderPaint.setAntiAlias(true);
		borderPaint.setStyle(Style.STROKE);
		borderPaint.setStrokeWidth(3);
		borderPaint.setColor(R.color.grey);

	}

	@Override
	protected void dispatchDraw(Canvas canvas) {

		RectF drawRect = new RectF();
		drawRect.set(0, 0, getMeasuredWidth(), getMeasuredHeight());
		canvas.drawRoundRect(drawRect, 10, 10, borderPaint);
		super.dispatchDraw(canvas);
	}

}
